#!/bin/bash 

INST_PATH=`pwd`/../install

#SQLITE_VERION=sqlite-autoconf-3071502
SQLITE_VERSION=sqlite-autoconf-3440200

if [ -e $INST_PATH/lib/libsqlite3.so ] ; then
		exit ;
fi

if [ ! -e $SQLITE_VERSION.tar.gz ] ; then
		#wget http://main.iot-yun.club:2211/src/$SQLITE_VERSION.tar.gz
			wget https://sqlite.org/2023/$SQLITE_VERSION.tar.gz
fi

if [ ! -d $SQLITE_VERSION ] ; then
		tar -xzf $SQLITE_VERSION.tar.gz 
fi

cd $SQLITE_VERSION
./configure --prefix=${INST_PATH} --enable-static

make && make install


